
import config from "@/config"
import http from "@/utils/request"

export default {
    hrUser: {
        getHrUserByAccountId:{
            url: `${config.API_URL}/get/member/getHrUserByAccountId`,
            name: "获取个人事档案",
            get: async function () {
                return await http.get(this.url);
            }
        },
        getHrUserListByDeptIdForSelect:{
            url: `${config.API_URL}/get/member/getHrUserListByDeptIdForSelect`,
            name: "按部门获取账户信息",
            get: async function (params) {
                return await http.get(this.url,params);
            }
        },
        getHrUserListByUserIds:{
            url: `${config.API_URL}/get/member/getHrUserListByUserIds`,
            name: "按UserId获取人员列表",
            get: async function (params) {
                return await http.get(this.url,params);
            }
        },
        getHrUserListByDeptId: {
            url: `${config.API_URL}/get/member/getHrUserListByDeptId`,
            name: "获取部门下的人员列表",
            get: async function (params) {
                return await http.get(this.url,params);
            }
        },
        importHrUser:{
            url: `${config.API_URL}/set/member/importHrUser`,
            name: "人事档案导入",
            post: async function (data, config = {}) {
                return await http.postFile(this.url, data, config);
            }
        },
        insertHrUser: {
            url: `${config.API_URL}/set/member/insertHrUser`,
            name: "添加人员信息",
            post: async function (data) {
                return await http.post(this.url, data, {headers: {}});
            }
        },
        deleteHrUser: {
            url: `${config.API_URL}/set/member/deleteHrUser`,
            name: "删除人员信息",
            post: async function (data) {
                return await http.post(this.url, data, {headers: {}});
            }
        },
        deleteByHrUserIds:{
            url: `${config.API_URL}/set/member/deleteByHrUserIds`,
            name: "批量删除人员信息",
            post: async function (data) {
                return await http.post(this.url, data, {headers: {}});
            }
        },
        updateHrUser: {
            url: `${config.API_URL}/set/member/updateHrUser`,
            name: "更新人员信息",
            post: async function (data) {
                return await http.post(this.url, data, {headers: {}});
            }
        },
        getExpUserRecord:{
            url: `${config.API_URL}/get/member/getExpUserRecord`,
            name: "导出人员信息",
            fileDownload: async function (data) {
                return await http.fileDownload(this.url, data,{
                    headers: {}
                })
            }
        },
    },
    hrDepartment: {
        insertHrDepartment: {
            url: `${config.API_URL}/set/member/insertHrDepartment`,
            name: "添加人员部门",
            post: async function (data) {
                return await http.post(this.url, data, {headers: {}});
            }
        },
        deleteHrDepartment: {
            url: `${config.API_URL}/set/member/deleteHrDepartment`,
            name: "删除人员部门",
            post: async function (data) {
                return await http.post(this.url, data, {headers: {}});
            }
        },
        deleteHrDepartmentByBatch: {
            url: `${config.API_URL}/set/member/deleteHrDepartment`,
            name: "批量删除人员部门",
            post: async function (data) {
                return await http.post(this.url, data, {headers: {}});
            }
        },
        updateHrDepartment: {
            url: `${config.API_URL}/set/member/updateHrDepartment`,
            name: "更新人员部门信息",
            post: async function (data) {
                return await http.post(this.url, data, {headers: {}});
            }
        },
        importHrDepartment: {
            url: `${config.API_URL}/set/member/importHrDepartment`,
            name: "导入人事部门",
            post: async function (data, config = {}) {
                return await http.postFile(this.url, data, config);
            }
        },
        getHrDepartmentTree: {
            url: `${config.API_URL}/get/member/getHrDepartmentTree`,
            name: "获取部门列表",
            get: async function (params) {
                return await http.get(this.url,params);
            }
        },
        getDeptListByDeptIdForSelect:{
            url: `${config.API_URL}/get/member/getDeptListByDeptIdForSelect`,
            name: "按条件获取部门列表",
            get: async function (params) {
                return await http.get(this.url,params);
            }
        },
        getHrDeptByDeptIds:{
            url: `${config.API_URL}/get/member/getHrDeptByDeptIds`,
            name: "获取部门列表",
            get: async function (params) {
                return await http.get(this.url,params);
            }
        }
    },
	hrDic: {
		getHrDicTree: {
			url: `${config.API_URL}/get/member/getHrDicTree`,
			name: "获取字典树",
			get: async function () {
				return await http.get(this.url);
			}
		},
		getHrDicList: {
			url: `${config.API_URL}/get/member/getHrDicList`,
			name: "字典明细",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		getHrDicParentList: {
			url: `${config.API_URL}/get/member/getHrDicParentList`,
			name: "获取字典数据",
			get: async function () {
				return await http.get(this.url);
			}
		},
		insert: {
			url: `${config.API_URL}/set/member/insertHrDic`,
			name: "添加字典",
			post: async function (data) {
				return await http.post(this.url, data, {headers: {}});
			}
		},
		delete: {
			url: `${config.API_URL}/set/member/deleteHrDic`,
			name: "删除字典",
			post: async function (data) {
				return await http.post(this.url, data, {headers: {}});
			}
		},
		dropHrDic: {
			url: `${config.API_URL}/set/member/dropHrDic`,
			name: "字典拖拽排序",
			post: async function (data) {
				return await http.post(this.url, data, {headers: {}});
			}
		},
		deleteHrDicByIds: {
			url: `${config.API_URL}/set/member/deleteHrDicByIds`,
			name: "批量删除字典",
			post: async function (data) {
				return await http.post(this.url, data, {headers: {}});
			}
		},
		update: {
			url: `${config.API_URL}/set/member/updateHrDic`,
			name: "更新字典",
			post: async function (data) {
				return await http.post(this.url, data, {headers: {}});
			}
		},
		getHrDicByCode: {
			url: `${config.API_URL}/get/member/getHrDicByCode`,
			name: "获取字典数据",
			get: async function (data) {
				return await http.get(this.url, data);
			}
		}
	},
}